package com.eedi.org.facade;

import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Collection;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;

public interface OrgInfoFacade {
    /**
     * 获取机构名称
     *
     * @param orgInfoId         机构名称
     * @param fillInConsumer 填充机构名称的Consumer，如setOrgName(String orgName);
     */
    void fillInOrgName(@Validated @NotBlank String orgInfoId, @Validated @NotNull Consumer<String> fillInConsumer);

    /**
     * 根据deptId获取deptName
     */
    <T> void fillInOrgName(@Validated @NotNull Collection<T> orgInfoColl, Function<T, String> orgInfoIdGetter, BiConsumer<T, String> orgNameConsumer);


}
